Chapterá9.áAdvanced topics

Table of Contents

9.1. VirtualBox configuration data
9.2. Automated Windows guest logons (VBoxGINA)
9.3. Custom external VRDP authentication
9.4. Secure labeling with VBoxSDL
9.5. Custom VESA resolutions
9.6. Multiple monitors for the guest
9.7. Releasing modifiers with VBoxSDL on Linux
9.8. Using serial ports
9.9. Using a raw host hard disk from a guest
9.9.1. Access to entire physical hard disk
9.9.2. Access to individual physical hard disk partitions
9.10. Allowing a virtual machine to start even with unavailable CD/DVD/floppy devices
9.11. Configuring the address of a NAT network interface
9.12. Configuring the maximum resolution of guests when using the graphical frontend
9.13. Configuring the BIOS DMI information

9.1.áVirtualBox configuration data

For each system user, VirtualBox stores configuration data in the user's home directory, as per the conventions of the host operating system:

  • On Windows, this is %HOMEDRIVE%%HOMEPATH%\.VirtualBox; typically something like C:\Documents and Settings\Username\.VirtualBox.

  • On Mac OS X, this is $HOME/Library/VirtualBox.

  • On Unix-like systems (Linux, Solaris), this is $HOME/.VirtualBox.

VirtualBox creates this configuration directory automatically, if necessary. Optionally, you can supply an alternate configuration directory by setting the VBOX_USER_HOME environment variable.

VirtualBox stores all its global and machine-specific configuration data in XML documents. We intentionally do not document the specifications of these files, as we must reserve the right to modify them in the future. We therefore strongly suggest that you do not edit these files manually. VirtualBox provides complete access to its configuration data through its the VBoxManage command line tool (see Chapterá8, VBoxManage reference) and its API (see Chapterá10, VirtualBox programming interfaces).

In the configuration directory, VirtualBox.xml is the main configuration file. This includes global configuration options and the media and virtual machine registry. The media registry links to all CD/DVD, floppy and disk images that have been added to the Virtual Disk Manager. For each registered VM, there is one entry which points to the VM configuration file, also in XML format.

You can globally change some of the locations where VirtualBox keeps extra configuration and data by selecting "Global settings" from the "File" menu in the VirtualBox main window. Then, in the window that pops up, click on the "General" tab.

  • Virtual machine settings and files are, by default, saved as XML files in a subdirectory of the .VirtualBox/Machines directory. You can change the location of this main "Machines" folder in the "Global settings" dialog.

    By default, for each virtual machine, VirtualBox uses another subdirectory of the "Machines" directory that carries the same name as the virtual machine. As a result, your virtual machine names must conform to the conventions of your operating system for valid file names. For example, a machine called "Fedora 6" would, by default, have its settings saved in .VirtualBox/Machines/Fedora 6/Fedora 6.xml. If you would like more control over the file names used, you can create the machine using VBoxManage createvm with the -settingsfile option; see Sectioná8.4, “VBoxManage createvm”.

    The virtual machine directory will be renamed if you change the machine name. If you do not wish this to happen, you can create the machine using VBoxManage createvm with the -basefolder option. In this case, the folder name will never change.

  • VirtualBox keeps snapshots and saved states in another special folder for each virtual machine. By default, this is a subfolder of the virtual machine folder called Snapshots -- in our example, .VirtualBox/Machines/Fedora 6/Snapshots. You can change this setting for each machine using VBoxManage as well.

  • VDI container files are, by default, created in the .VirtualBox/VDI directory. In particular, this directory is used when the "Create new virtual disk" wizard is started to create a new VDI file. Changing this default is probably most useful if the disk containing your home directory does not have enough room to hold your VDI files, which can grow very large.